package JAVACORE_TRAINING.OOPS_CONCEPTS.INHERISTANCES;

class Parent01 {
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}

public class ReferingProperty 
						extends Parent01 {
	String name;
	
    public void details()
    {
        super.setName("Parent");	    //refers to parent class member
        name = "Child";
        System.out.println(super.getName()+" and "+name);
    }
    
    public static void main(String[] args)
    {
    	ReferingProperty cobj = new ReferingProperty();
        cobj.details();
    }
}
